<!doctype html>
<html lang="zh-CN" data-theme="light">
  <head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <meta name="generator" content="VuePress 2.0.0-rc.0" />
    <meta name="theme" content="VuePress Theme Hope 2.0.0-rc.4" />
    <style>
      html {
        background: var(--bg-color, #fff);
      }

      html[data-theme="dark"] {
        background: var(--bg-color, #1d1e1f);
      }

      body {
        background: var(--bg-color);
      }
    </style>
    <script>
      const userMode = localStorage.getItem("vuepress-theme-hope-scheme");
      const systemDarkMode =
        window.matchMedia &&
        window.matchMedia("(prefers-color-scheme: dark)").matches;

      if (userMode === "dark" || (userMode !== "light" && systemDarkMode)) {
        document.documentElement.setAttribute("data-theme", "dark");
      }
    </script>
    <meta property="og:url" content="https://kkbt.gitee.io/obcsapi-go/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html"><meta property="og:site_name" content="Obcsapi Docs"><meta property="og:title" content="4. 功能使用"><meta property="og:description" content="功能使用 接口一览 方式 验证 路径 说明 -------- :------------: ------------------- --------------------------- Any WeChat Mp 验证 /api/wechat 微信测试号使用 POST token2 /ob/fv fv 悬浮球自定义任务图文分享 POST token2..."><meta property="og:type" content="article"><meta property="og:locale" content="zh-CN"><meta property="og:updated_time" content="2023-12-15T10:21:25.000Z"><meta property="article:author" content="恐咖兵糖"><meta property="article:modified_time" content="2023-12-15T10:21:25.000Z"><script type="application/ld+json">{"@context":"https://schema.org","@type":"Article","headline":"4. 功能使用","image":[""],"dateModified":"2023-12-15T10:21:25.000Z","author":[{"@type":"Person","name":"恐咖兵糖","url":"https://www.ftls.xyz"}]}</script><title>4. 功能使用 | Obcsapi Docs</title><meta name="description" content="功能使用 接口一览 方式 验证 路径 说明 -------- :------------: ------------------- --------------------------- Any WeChat Mp 验证 /api/wechat 微信测试号使用 POST token2 /ob/fv fv 悬浮球自定义任务图文分享 POST token2...">
    <link rel="preload" href="/obcsapi-go/assets/style-9s-QIunb.css" as="style"><link rel="stylesheet" href="/obcsapi-go/assets/style-9s-QIunb.css">
    <link rel="modulepreload" href="/obcsapi-go/assets/app-Z7Ab_rlY.js"><link rel="modulepreload" href="/obcsapi-go/assets/4-功能使用.html-HA04khvf.js"><link rel="modulepreload" href="/obcsapi-go/assets/plugin-vue_export-helper-x3n3nnut.js"><link rel="modulepreload" href="/obcsapi-go/assets/4-功能使用.html-ttgMb7u6.js">
    <link rel="prefetch" href="/obcsapi-go/assets/index.html-fdTDfnjr.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/sidebar.html-jB1xGYqI.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/index.html-Hvy2wwxp.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/faq.html-mKoAR3uM.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/python-version.html-vf0nybSU.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/segmenter.html-x2RHHlfq.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/1-概述.html-1Aget6eB.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/10-软件联动.html-EmF0bIbD.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/2-运行与部署.html-wLD5V9DU.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/3-配置说明.html-eL8YncYb.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/5-图床说明.html-A11QdaTg.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/6-通用接口.html-U5YT_B5f.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/7-前端说明.html-KybtBryq.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/8-指令模式.html-wXtGs56E.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/9-自定义脚本.html--n-mXSKu.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/97-缓存说明.html-eFwNZ08d.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/98-开发说明.html-ZfxJGNnf.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/99-更新记录.html-0TejNJ5M.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/404.html-4ErOMmFg.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/index.html-xXuAGb7e.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/index.html-4rjMgIHd.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/sidebar.html-wGVg8F5h.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/index.html-ruH2hKFx.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/faq.html-zDuUwFZF.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/python-version.html-OJC-u2wE.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/segmenter.html-E2ACBYNW.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/1-概述.html-wPWQo3X2.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/10-软件联动.html-gT0uOX_3.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/2-运行与部署.html-DN2q0Bmm.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/3-配置说明.html-xRzMnhoq.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/5-图床说明.html-6nBjP0OC.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/6-通用接口.html-lklqyXKl.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/7-前端说明.html-EpAGTac3.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/8-指令模式.html-9WLBzs8Q.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/9-自定义脚本.html-Cpm0CPel.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/97-缓存说明.html-4cg_AhVz.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/98-开发说明.html-mSLqrr6J.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/99-更新记录.html-KOAe7ckg.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/404.html-yZnpEtqh.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/index.html-IdkU12pD.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/giscus-unEZQsJ0.js" as="script"><link rel="prefetch" href="/obcsapi-go/assets/photoswipe.esm-i2ohwMnJ.js" as="script">
  </head>
  <body>
    <div id="app"><!--[--><!--[--><!--[--><span tabindex="-1"></span><a href="#main-content" class="vp-skip-link sr-only">跳至主要內容</a><!--]--><!--[--><div class="theme-container has-toc"><!--[--><header id="navbar" class="vp-navbar"><div class="vp-navbar-start"><button type="button" class="vp-toggle-sidebar-button" title="Toggle Sidebar"><span class="icon"></span></button><!--[--><!----><!--]--><!--[--><a class="vp-link vp-brand vp-brand" href="/obcsapi-go/"><img class="vp-nav-logo" src="https://theme-hope-assets.vuejs.press/logo.svg" alt="Obcsapi Docs"><!----><span class="vp-site-name hide-in-pad">Obcsapi Docs</span></a><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-center"><!--[--><!----><!--]--><!--[--><nav class="vp-nav-links"><div class="nav-item hide-in-mobile"><a aria-label="项目主页" class="vp-link nav-link nav-link" href="/obcsapi-go/"><span class="font-icon icon fa-fw fa-sm fas fa-home" style=""></span>项目主页<!----></a></div><div class="nav-item hide-in-mobile"><a aria-label="Obcsapi 文档" class="vp-link nav-link active nav-link active" href="/obcsapi-go/md/"><span class="font-icon icon fa-fw fa-sm fas fa-laptop-code" style=""></span>Obcsapi 文档<!----></a></div><div class="nav-item hide-in-mobile"><a href="https://gitee.com/kkbt/obcsapi-go" rel="noopener noreferrer" target="_blank" aria-label="代码 Gitee" class="nav-link"><span class="font-icon icon fa-fw fa-sm fas fa-link" style=""></span>代码 Gitee<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="nav-item hide-in-mobile"><a href="https://github.com/kkbt0/obcsapi-go" rel="noopener noreferrer" target="_blank" aria-label="代码 Github" class="nav-link"><span class="font-icon icon fa-fw fa-sm fas fa-link" style=""></span>代码 Github<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div></nav><!--]--><!--[--><!----><!--]--></div><div class="vp-navbar-end"><!--[--><!----><!--]--><!--[--><!----><div class="nav-item vp-repo"><a class="vp-repo-link" href="https://gitee.com/kkbt/obcsapi-go" target="_blank" rel="noopener noreferrer" aria-label="Gitee"><svg xmlns="http://www.w3.org/2000/svg" class="icon gitee-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="gitee icon" style="width:1.25rem;height:1.25rem;vertical-align:middle;"><path d="M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm242.97-533.34H482.39a23.7 23.7 0 0 0-23.7 23.7l-.03 59.28c0 13.08 10.59 23.7 23.7 23.7h165.96a23.7 23.7 0 0 1 23.7 23.7v11.85a71.1 71.1 0 0 1-71.1 71.1H375.71a23.7 23.7 0 0 1-23.7-23.7V423.11a71.1 71.1 0 0 1 71.1-71.1h331.8a23.7 23.7 0 0 0 23.7-23.7l.06-59.25a23.73 23.73 0 0 0-23.7-23.73H423.11a177.78 177.78 0 0 0-177.78 177.75v331.83c0 13.08 10.62 23.7 23.7 23.7h349.62a159.99 159.99 0 0 0 159.99-159.99V482.33a23.7 23.7 0 0 0-23.7-23.7z"></path></svg></a></div><div class="nav-item hide-in-mobile"><button type="button" id="appearance-switch"><svg xmlns="http://www.w3.org/2000/svg" class="icon auto-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="auto icon" style="display:block;"><path d="M512 992C246.92 992 32 777.08 32 512S246.92 32 512 32s480 214.92 480 480-214.92 480-480 480zm0-840c-198.78 0-360 161.22-360 360 0 198.84 161.22 360 360 360s360-161.16 360-360c0-198.78-161.22-360-360-360zm0 660V212c165.72 0 300 134.34 300 300 0 165.72-134.28 300-300 300z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon dark-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="dark icon" style="display:none;"><path d="M524.8 938.667h-4.267a439.893 439.893 0 0 1-313.173-134.4 446.293 446.293 0 0 1-11.093-597.334A432.213 432.213 0 0 1 366.933 90.027a42.667 42.667 0 0 1 45.227 9.386 42.667 42.667 0 0 1 10.24 42.667 358.4 358.4 0 0 0 82.773 375.893 361.387 361.387 0 0 0 376.747 82.774 42.667 42.667 0 0 1 54.187 55.04 433.493 433.493 0 0 1-99.84 154.88 438.613 438.613 0 0 1-311.467 128z"></path></svg><svg xmlns="http://www.w3.org/2000/svg" class="icon light-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="light icon" style="display:none;"><path d="M952 552h-80a40 40 0 0 1 0-80h80a40 40 0 0 1 0 80zM801.88 280.08a41 41 0 0 1-57.96-57.96l57.96-58a41.04 41.04 0 0 1 58 58l-58 57.96zM512 752a240 240 0 1 1 0-480 240 240 0 0 1 0 480zm0-560a40 40 0 0 1-40-40V72a40 40 0 0 1 80 0v80a40 40 0 0 1-40 40zm-289.88 88.08-58-57.96a41.04 41.04 0 0 1 58-58l57.96 58a41 41 0 0 1-57.96 57.96zM192 512a40 40 0 0 1-40 40H72a40 40 0 0 1 0-80h80a40 40 0 0 1 40 40zm30.12 231.92a41 41 0 0 1 57.96 57.96l-57.96 58a41.04 41.04 0 0 1-58-58l58-57.96zM512 832a40 40 0 0 1 40 40v80a40 40 0 0 1-80 0v-80a40 40 0 0 1 40-40zm289.88-88.08 58 57.96a41.04 41.04 0 0 1-58 58l-57.96-58a41 41 0 0 1 57.96-57.96z"></path></svg></button></div><!----><!--]--><!--[--><!----><!--]--><button type="button" class="vp-toggle-navbar-button" aria-label="Toggle Navbar" aria-expanded="false" aria-controls="nav-screen"><span><span class="vp-top"></span><span class="vp-middle"></span><span class="vp-bottom"></span></span></button></div></header><!----><!--]--><!----><div class="toggle-sidebar-wrapper"><span class="arrow start"></span></div><aside id="sidebar" class="vp-sidebar"><!--[--><!----><!--]--><ul class="vp-sidebar-links"><li><!--[--><a aria-label="项目主页" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/"><span class="font-icon icon fa-fw fa-sm fas fa-home" style=""></span>项目主页<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="Obcsapi 文档" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md.html"><span class="font-icon icon fa-fw fa-sm fas fa-laptop-code" style=""></span>Obcsapi 文档<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><section class="vp-sidebar-group"><p class="vp-sidebar-heading clickable active"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span><a aria-label="Go 版本" class="vp-link nav-link active vp-sidebar-title nav-link active vp-sidebar-title" href="/obcsapi-go/md/go-version.html"><!---->Go 版本<!----></a><!----></p><ul class="vp-sidebar-links"><li><!--[--><a aria-label="1. 概述" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/1-%E6%A6%82%E8%BF%B0.html"><!---->1. 概述<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="2. 运行与部署" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/2-%E8%BF%90%E8%A1%8C%E4%B8%8E%E9%83%A8%E7%BD%B2.html"><!---->2. 运行与部署<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="3. 配置说明" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/3-%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E.html"><!---->3. 配置说明<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="4. 功能使用" class="vp-link nav-link active vp-sidebar-link vp-sidebar-page active nav-link active vp-sidebar-link vp-sidebar-page active" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html"><!---->4. 功能使用<!----></a><ul class="vp-sidebar-sub-headers"><li class="vp-sidebar-sub-header"><a aria-label="功能使用" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#功能使用"><!---->功能使用<!----></a><ul class="vp-sidebar-sub-headers"><li class="vp-sidebar-sub-header"><a aria-label="前端" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#前端"><!---->前端<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="本地存储 （服务器 WebDav 服务）" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#本地存储-服务器-webdav-服务"><!---->本地存储 （服务器 WebDav 服务）<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="文件管理" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#文件管理"><!---->文件管理<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="通用接口" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#通用接口"><!---->通用接口<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="消息通知接口" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#消息通知接口"><!---->消息通知接口<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="Public 公开文档功能" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#public-公开文档功能"><!---->Public 公开文档功能<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="WeChat" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#wechat"><!---->WeChat<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="微信/前端指令模式（指令模式）" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#微信-前端指令模式-指令模式"><!---->微信/前端指令模式（指令模式）<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="任务提醒" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#任务提醒"><!---->任务提醒<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="fv 悬浮球" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#fv-悬浮球"><!---->fv 悬浮球<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="简悦 Webhook 配置" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#简悦-webhook-配置"><!---->简悦 Webhook 配置<!----></a><ul class="vp-sidebar-sub-headers"></ul></li><li class="vp-sidebar-sub-header"><a aria-label="每日日志分析示例" class="vp-link nav-link vp-sidebar-link vp-heading nav-link vp-sidebar-link vp-heading" href="/obcsapi-go/md/go-version/4-%E5%8A%9F%E8%83%BD%E4%BD%BF%E7%94%A8.html#每日日志分析示例"><!---->每日日志分析示例<!----></a><ul class="vp-sidebar-sub-headers"></ul></li></ul></li></ul><!--]--></li><li><!--[--><a aria-label="5. 图床说明" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/5-%E5%9B%BE%E5%BA%8A%E8%AF%B4%E6%98%8E.html"><!---->5. 图床说明<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="6. 通用接口" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/6-%E9%80%9A%E7%94%A8%E6%8E%A5%E5%8F%A3.html"><!---->6. 通用接口<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="7. 前端说明" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/7-%E5%89%8D%E7%AB%AF%E8%AF%B4%E6%98%8E.html"><!---->7. 前端说明<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="8. 指令模式" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/8-%E6%8C%87%E4%BB%A4%E6%A8%A1%E5%BC%8F.html"><!---->8. 指令模式<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="9. 自定义脚本" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/9-%E8%87%AA%E5%AE%9A%E4%B9%89%E8%84%9A%E6%9C%AC.html"><!---->9. 自定义脚本<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="10. 软件联动" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/10-%E8%BD%AF%E4%BB%B6%E8%81%94%E5%8A%A8.html"><!---->10. 软件联动<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="97 缓存说明" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/97-%E7%BC%93%E5%AD%98%E8%AF%B4%E6%98%8E.html"><!---->97 缓存说明<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="98. 开发说明" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/98-%E5%BC%80%E5%8F%91%E8%AF%B4%E6%98%8E.html"><!---->98. 开发说明<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="99. 更新记录" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/go-version/99-%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95.html"><!---->99. 更新记录<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li></ul></section></li><li><!--[--><a href="https://kkbt.gitee.io/obcsapi-go/swagger/swagger.html" rel="noopener noreferrer" target="_blank" aria-label="Go 版本 Swagger(Scalar)" class="nav-link vp-sidebar-link vp-sidebar-page"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>Go 版本 Swagger(Scalar)<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="Python 版本" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/python-version.html"><span class="font-icon icon fa-fw fa-sm fas fa-book" style=""></span>Python 版本<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li><li><!--[--><a aria-label="FAQ" class="vp-link nav-link vp-sidebar-link vp-sidebar-page nav-link vp-sidebar-link vp-sidebar-page" href="/obcsapi-go/md/faq.html"><!---->FAQ<!----></a><ul class="vp-sidebar-sub-headers"></ul><!--]--></li></ul><!--[--><!----><!--]--></aside><!--[--><main id="main-content" class="vp-page"><!--[--><!--[--><!----><!--]--><!----><nav class="vp-breadcrumb disable"></nav><div class="vp-page-title"><h1><!---->4. 功能使用</h1><div class="page-info"><span class="page-author-info" aria-label="作者🖊" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon author-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="author icon"><path d="M649.6 633.6c86.4-48 147.2-144 147.2-249.6 0-160-128-288-288-288s-288 128-288 288c0 108.8 57.6 201.6 147.2 249.6-121.6 48-214.4 153.6-240 288-3.2 9.6 0 19.2 6.4 25.6 3.2 9.6 12.8 12.8 22.4 12.8h704c9.6 0 19.2-3.2 25.6-12.8 6.4-6.4 9.6-16 6.4-25.6-25.6-134.4-121.6-240-243.2-288z"></path></svg><span><a class="page-author-item" href="https://www.ftls.xyz" target="_blank" rel="noopener noreferrer">恐咖兵糖</a></span><span property="author" content="恐咖兵糖"></span></span><!----><span class="page-date-info" aria-label="写作日期📅" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon calendar-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="calendar icon"><path d="M716.4 110.137c0-18.753-14.72-33.473-33.472-33.473-18.753 0-33.473 14.72-33.473 33.473v33.473h66.993v-33.473zm-334.87 0c0-18.753-14.72-33.473-33.473-33.473s-33.52 14.72-33.52 33.473v33.473h66.993v-33.473zm468.81 33.52H716.4v100.465c0 18.753-14.72 33.473-33.472 33.473a33.145 33.145 0 01-33.473-33.473V143.657H381.53v100.465c0 18.753-14.72 33.473-33.473 33.473a33.145 33.145 0 01-33.473-33.473V143.657H180.6A134.314 134.314 0 0046.66 277.595v535.756A134.314 134.314 0 00180.6 947.289h669.74a134.36 134.36 0 00133.94-133.938V277.595a134.314 134.314 0 00-133.94-133.938zm33.473 267.877H147.126a33.145 33.145 0 01-33.473-33.473c0-18.752 14.72-33.473 33.473-33.473h736.687c18.752 0 33.472 14.72 33.472 33.473a33.145 33.145 0 01-33.472 33.473z"></path></svg><span><!----></span><meta property="datePublished" content="2023-12-09T09:33:57.000Z"></span><!----><span class="page-reading-time-info" aria-label="阅读时间⌛" data-balloon-pos="down"><svg xmlns="http://www.w3.org/2000/svg" class="icon timer-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="timer icon"><path d="M799.387 122.15c4.402-2.978 7.38-7.897 7.38-13.463v-1.165c0-8.933-7.38-16.312-16.312-16.312H256.33c-8.933 0-16.311 7.38-16.311 16.312v1.165c0 5.825 2.977 10.874 7.637 13.592 4.143 194.44 97.22 354.963 220.201 392.763-122.204 37.542-214.893 196.511-220.2 389.397-4.661 5.049-7.638 11.651-7.638 19.03v5.825h566.49v-5.825c0-7.379-2.849-13.981-7.509-18.9-5.049-193.016-97.867-351.985-220.2-389.527 123.24-37.67 216.446-198.453 220.588-392.892zM531.16 450.445v352.632c117.674 1.553 211.787 40.778 211.787 88.676H304.097c0-48.286 95.149-87.382 213.728-88.676V450.445c-93.077-3.107-167.901-81.297-167.901-177.093 0-8.803 6.99-15.793 15.793-15.793 8.803 0 15.794 6.99 15.794 15.793 0 80.261 63.69 145.635 142.01 145.635s142.011-65.374 142.011-145.635c0-8.803 6.99-15.793 15.794-15.793s15.793 6.99 15.793 15.793c0 95.019-73.789 172.82-165.96 177.093z"></path></svg><span>大约 13 分钟</span><meta property="timeRequired" content="PT13M"></span><!----><!----></div><hr></div><div class="toc-place-holder"><aside id="toc"><!--[--><!----><!--]--><div class="toc-header">此页内容<button type="button" class="print-button" title="打印"><svg xmlns="http://www.w3.org/2000/svg" class="icon print-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="print icon"><path d="M819.2 364.8h-44.8V128c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v236.8h-44.8C145.067 364.8 96 413.867 96 473.6v192c0 59.733 49.067 108.8 108.8 108.8h44.8V896c0 17.067 14.933 32 32 32h460.8c17.067 0 32-14.933 32-32V774.4h44.8c59.733 0 108.8-49.067 108.8-108.8v-192c0-59.733-49.067-108.8-108.8-108.8zM313.6 160h396.8v204.8H313.6V160zm396.8 704H313.6V620.8h396.8V864zM864 665.6c0 25.6-19.2 44.8-44.8 44.8h-44.8V588.8c0-17.067-14.933-32-32-32H281.6c-17.067 0-32 14.933-32 32v121.6h-44.8c-25.6 0-44.8-19.2-44.8-44.8v-192c0-25.6 19.2-44.8 44.8-44.8h614.4c25.6 0 44.8 19.2 44.8 44.8v192z"></path></svg></button></div><div class="toc-wrapper"><ul class="toc-list"><!--[--><li class="toc-item"><a class="vp-link toc-link level2 toc-link level2" href="#功能使用">功能使用</a></li><li><ul class="toc-list"><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#前端">前端</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#本地存储-服务器-webdav-服务">本地存储 （服务器 WebDav 服务）</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#文件管理">文件管理</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#通用接口">通用接口</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#消息通知接口">消息通知接口</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#public-公开文档功能">Public 公开文档功能</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#wechat">WeChat</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#微信-前端指令模式-指令模式">微信/前端指令模式（指令模式）</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#任务提醒">任务提醒</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#fv-悬浮球">fv 悬浮球</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#简悦-webhook-配置">简悦 Webhook 配置</a></li><!----><!--]--><!--[--><li class="toc-item"><a class="vp-link toc-link level3 toc-link level3" href="#每日日志分析示例">每日日志分析示例</a></li><!----><!--]--></ul></li><!--]--></ul><div class="toc-marker" style="top:-1.7rem;"></div></div><!--[--><!----><!--]--></aside></div><!--[--><!----><!--]--><div class="theme-hope-content"><h2 id="功能使用" tabindex="-1"><a class="header-anchor" href="#功能使用" aria-hidden="true">#</a> 功能使用</h2><p>接口一览</p><table><thead><tr><th>方式</th><th style="text-align:center;">验证</th><th>路径</th><th>说明</th></tr></thead><tbody><tr><td>Any</td><td style="text-align:center;">WeChat Mp 验证</td><td>/api/wechat</td><td>微信测试号使用</td></tr><tr><td>POST</td><td style="text-align:center;">token2</td><td>/ob/fv</td><td>fv 悬浮球自定义任务图文分享</td></tr><tr><td>POST</td><td style="text-align:center;">token2</td><td>/ob/sr/webhook</td><td>简悦 Webhook</td></tr><tr><td>POST</td><td style="text-align:center;">token2</td><td>/ob/general</td><td>General 通用接口</td></tr><tr><td>POST</td><td style="text-align:center;">token2</td><td>/ob/url</td><td>页面转 md 存储 效果很一般</td></tr><tr><td>POST</td><td style="text-align:center;">token2</td><td>/ob/moonreader</td><td>静读天下高亮和笔记</td></tr><tr><td>POST</td><td style="text-align:center;">token2</td><td>/api/upload</td><td>图床 PicGo 可用</td></tr><tr><td>GET</td><td style="text-align:center;">/</td><td>/public/*</td><td>公开文档功能</td></tr><tr><td>...</td><td style="text-align:center;">...</td><td>...</td><td>...</td></tr></tbody></table><p>一些访问方式可见文件 <a href="https://gitee.com/kkbt/obcsapi-go/blob/master/http/server.http" target="_blank" rel="noopener noreferrer">http/server.http<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 或者运行后见 Swagger ，路径 <code>http://localhost:8900/swagger/index.html</code></p><p>文档提供了一个<a href="https://kkbt.gitee.io/obcsapi-go/swagger/swagger.html" target="_blank" rel="noopener noreferrer">在线的 API 文档 - Scalar API references<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>，可以简单查看下都有什么 API ，以及不同程序语言的请求代码。具体请求头的验证，需要的参数，见 后端程序的 Swagger 或源代码。</p><p>输出为 JSON 格式的 RJSON 可使用 Query(&quot;field&quot;) , 可选择字段：code，msg，data</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>GET {{host}}/404
响应：
{
  &quot;code&quot;: 404,
  &quot;msg&quot;: &quot;Not Found&quot;,
  &quot;data&quot;: {}
}

GET {{host}}/404?field=msg
响应
Not Found
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="前端" tabindex="-1"><a class="header-anchor" href="#前端" aria-hidden="true">#</a> 前端</h3><p>本地 <a href="http://localhost:8900/" target="_blank" rel="noopener noreferrer">http://localhost:8900/<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 或者 <a href="https://kkbt.gitee.io/web/" target="_blank" rel="noopener noreferrer">https://kkbt.gitee.io/web/<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><p>支持 PWA ，部署后访问根路径即可。如 <code>http://localhost:8900/</code></p><h3 id="本地存储-服务器-webdav-服务" tabindex="-1"><a class="header-anchor" href="#本地存储-服务器-webdav-服务" aria-hidden="true">#</a> 本地存储 （服务器 WebDav 服务）</h3><p>配置文件中设置 WebDav 相关用户名，密码, <code>webdav_server</code>值设置为 <code>true</code>。并填写的 Remotely Save 插件 Webdav 方式的服务器地址，用户名，密码中。检查同步效果。服务器地址为 <code>http://localhost:8900/webdav</code> 。前端配置账户密码和功能是否开启。</p><p>设 Obcsapi 进行二级代理后，<code>http://localhost:8900</code> 代理为 <code>https://examples.com/obcsapi</code> 。<code>http://localhost:8900/webdav</code>代理为 <code>https://examples.com/webdav</code></p><p>Remotely Save Webdav 插件配置 服务器 <code>https://examples.com/webdav</code> 用户<code>kkbt</code> 密码 <code>kkbt123</code></p><p><strong>注意：<code>https://examples.com/obcsapi/webdav</code>在部分客户端软件正常工作，但是 Remotely Save 可能出现 Don&#39;t start with ... 情况，<code>http://localhost:8900/webdav</code>代理为 <code>https://examples.com/webdav</code> 可以解决这个问题</strong></p><p>本地服务 LocalStorage 本地存储，开启 Webdav 服务为 Remotely Save 提供同步。同时 WebDav 服务可连接 RAIDrive (Windows) ， Mix (安卓) 等进行文件管理。</p><p>注意：建议进行反向代理开启 https ，http 数据是在网络明文上传输的，并不安全。</p><p>虽然未我使用的 https ，但也贴出可能出现的问题。</p><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>微软的操作系统win7和win10对WebDAV默认只支持https协议的，需要修改注册表后才可以同时支持https和http
运行输入框中输入regedit敲回车打开注册表
在HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters位置，修改BasicAuthLevel 值改成2
重启webclient
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="文件管理" tabindex="-1"><a class="header-anchor" href="#文件管理" aria-hidden="true">#</a> 文件管理</h3><p>建议使用其他软件，比如宝塔面板，或者 Alist 等程序对 Docker 暴露的文件夹进行文件管理，或修改配置。一般可选择 WebDav 的客户端。 WebDav 服务可连接 RAIDrive (Windows) ， Mix (安卓) 等进行 Obsidian 库和图床文件管理。</p><p>WebDav 下的 obnote 是 Remotely Save WebDav 的默认文件夹（由库文件夹决定）， images 是本程序图床文件夹。</p><p>RailDrive 配置示例：<code>examples.com</code> <code>443</code> <code>/webdav</code> <code>kkbt</code> <code>kkbt123</code><br> Mix 配置示例：<code>https://examples.com</code> <code>kkbt</code> <code>kkbt123</code> 高级设置 <code>remote=/webdav</code></p><h3 id="通用接口" tabindex="-1"><a class="header-anchor" href="#通用接口" aria-hidden="true">#</a> 通用接口</h3><h4 id="接口1" tabindex="-1"><a class="header-anchor" href="#接口1" aria-hidden="true">#</a> 接口1</h4><div class="language-http line-numbers-mode" data-ext="http"><pre class="language-http"><code>POST {{host}}/ob/general
<span class="token header"><span class="token header-name keyword">Token</span><span class="token punctuation">:</span> <span class="token header-value">{{token2}}</span></span>
<span class="token header"><span class="token header-name keyword">Content-Type</span><span class="token punctuation">:</span> <span class="token header-value">application/json</span></span>
<span class="token application-json">
<span class="token punctuation">{</span><span class="token property">&quot;content&quot;</span><span class="token operator">:</span><span class="token string">&quot;zk 30个字符以上，并以zk 开头可以触发zk附件&quot;</span><span class="token punctuation">}</span>
</span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>以 <code>zk </code> 开头，并且长度大于 30 可触发 zk 格式附件。</p><p>如 IOS 捷径可使用此接口，图片见 <a href="/obcsapi-go/md/go-version/md/go-version/6-%E9%80%9A%E7%94%A8%E6%8E%A5%E5%8F%A3.html" class="">通用接口</a></p><h4 id="接口2-flomo-like" tabindex="-1"><a class="header-anchor" href="#接口2-flomo-like" aria-hidden="true">#</a> 接口2 flomo like</h4><div class="language-http line-numbers-mode" data-ext="http"><pre class="language-http"><code>POST {{host}}/ob/general/{{token2}}
<span class="token header"><span class="token header-name keyword">Content-Type</span><span class="token punctuation">:</span> <span class="token header-value">application/json</span></span>
<span class="token application-json">
<span class="token punctuation">{</span><span class="token property">&quot;content&quot;</span><span class="token operator">:</span><span class="token string">&quot;test From general&quot;</span><span class="token punctuation">}</span>
</span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>类似 flomo api , 除了认证方式和接口1不同，其他相同</p><h4 id="接口3-全文件通用接口" tabindex="-1"><a class="header-anchor" href="#接口3-全文件通用接口" aria-hidden="true">#</a> 接口3 全文件通用接口</h4><p>配置文件中开启功能</p><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="language-yaml"><code><span class="token key atrule">general_allowed</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><div class="language-http line-numbers-mode" data-ext="http"><pre class="language-http"><code>POST {{host}}/ob/generalall
<span class="token header"><span class="token header-name keyword">Token</span><span class="token punctuation">:</span> <span class="token header-value">{{token2}}</span></span>
<span class="token header"><span class="token header-name keyword">Content-Type</span><span class="token punctuation">:</span> <span class="token header-value">application/json</span></span>
<span class="token application-json">
<span class="token punctuation">{</span><span class="token property">&quot;content&quot;</span><span class="token operator">:</span><span class="token string">&quot;test From generalall&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;mod&quot;</span><span class="token operator">:</span><span class="token string">&quot;cover&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;file_key&quot;</span><span class="token operator">:</span><span class="token string">&quot;xxx.md&quot;</span><span class="token punctuation">}</span>
</span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><table><thead><tr><th>字段</th><th>必须</th><th>说明</th></tr></thead><tbody><tr><td>content</td><td>√</td><td>内容</td></tr><tr><td>mod</td><td>×</td><td>留空默认append ，可选 cover,append</td></tr><tr><td>file_key</td><td>×</td><td>留空自动时间戳命名 eg: <code>dir/title.md</code></td></tr></tbody></table><p>file_key 默认 <code>支持类文件/通用接口/20060102150405.md</code> 格式</p><h3 id="消息通知接口" tabindex="-1"><a class="header-anchor" href="#消息通知接口" aria-hidden="true">#</a> 消息通知接口</h3><p>程序提供两种可以通过 API 调用的通知方式。</p><p><strong>！！！注意：微信模板消息施行掐头去尾，很有可能不好使！！！</strong> 参考 <a href="https://developers.weixin.qq.com/community/develop/doc/000a2ae286cdc0f41a8face4c51801?blockType=1&amp;page=14#comment-list" target="_blank" rel="noopener noreferrer">关于规范公众号模板消息的再次公告 2023 03 30<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 此外 5 月 4 日后中间的主内容中，单个字段内容不超过20个字，且不支持换行。</p><div class="language-http line-numbers-mode" data-ext="http"><pre class="language-http"><code>### WechatMp 模板消息
POST {{host}}/api/wechatmpmsg
<span class="token header"><span class="token header-name keyword">Token</span><span class="token punctuation">:</span> <span class="token header-value">{{token2}}</span></span>
<span class="token header"><span class="token header-name keyword">Content-Type</span><span class="token punctuation">:</span> <span class="token header-value">application/json</span></span>
<span class="token application-json">
<span class="token punctuation">{</span><span class="token property">&quot;content&quot;</span><span class="token operator">:</span><span class="token string">&quot;以下是测试内容部分&quot;</span><span class="token punctuation">}</span>
### Mail msg
POST <span class="token punctuation">{</span><span class="token punctuation">{</span>host<span class="token punctuation">}</span><span class="token punctuation">}</span>/api/sendmail
Token<span class="token operator">:</span> <span class="token punctuation">{</span><span class="token punctuation">{</span>token2<span class="token punctuation">}</span><span class="token punctuation">}</span>
Content-Type<span class="token operator">:</span> application/json

<span class="token punctuation">{</span><span class="token property">&quot;subject&quot;</span><span class="token operator">:</span><span class="token string">&quot;主题&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;content&quot;</span><span class="token operator">:</span><span class="token string">&quot;以下是测试内容部分&quot;</span><span class="token punctuation">}</span>
</span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h3 id="public-公开文档功能" tabindex="-1"><a class="header-anchor" href="#public-公开文档功能" aria-hidden="true">#</a> Public 公开文档功能</h3><p>以配置项中 <code>ob_daily_other_dir: 支持类文件/</code> 为例，在 <code>支持类文件/Public/</code>下的文档可以公开访问。如 <code>支持类文件/Public/test.md</code> 的访问路径为 <code>https://127.0.0.1:8900/public/test.md</code> 。仅支持 Markdown 文件，图片文件公开请使用图床功能。</p><p>访问 <code>https://127.0.0.1:8900/public/test.md?raw=true</code> 可请求原始文档。</p><p>该文档功能最短刷新时间是 10s , 10s 内有缓存。</p><h3 id="wechat" tabindex="-1"><a class="header-anchor" href="#wechat" aria-hidden="true">#</a> WeChat</h3><p>微信测试号，配置完成后。微信测试号发送消息返回的链接，已保存的网址，进入前端网站，填写服务器后端URL，配置文件中设置的账户密码然后登录。若第一次显示小❌，未能自动跳转登录界面，可点击齿轮，点击注销。</p><h4 id="微信公众号说明" tabindex="-1"><a class="header-anchor" href="#微信公众号说明" aria-hidden="true">#</a> 微信公众号说明</h4><p>微信测试号发送消息，保存 Obsidian 中。前端在 <a href="https://gitee.com/kkbt/obweb" target="_blank" rel="noopener noreferrer">https://gitee.com/kkbt/obweb<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 中，实例 <a href="https://kkbt.gitee.io/obweb/#/" target="_blank" rel="noopener noreferrer">https://kkbt.gitee.io/obweb/#/<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 点击右侧图片。使用 localStorge 存储 api 地址和 token 。你可以将 <a href="https://gitee.com/kkbt/obweb" target="_blank" rel="noopener noreferrer">https://gitee.com/kkbt/obweb<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> frok 下来，用 <a href="http://Memos.md" target="_blank" rel="noopener noreferrer">Memos.md<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 文件内容覆盖 <a href="http://HOME.md" target="_blank" rel="noopener noreferrer">HOME.md<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> ，然后借助 github pages 静态部署整个项目，这个项目整个文件夹就是一个 Obsidian 库，也是一个 Docsify 文档文件夹。如果使用对象存储的静态网站功能，可以轻松部署成网页。</p><ul><li>支持图片和文字</li><li>图片下载到存储本地，而非链接(微信发送的图片，会给咱们的服务器返回图片URL)</li><li>对用户的判断，仅限特定用户存储笔记。(根据 OpenID 判断)</li><li>检索文字中含有 &quot;todo&quot; ，则生成勾选框。如 <code>- [ ] 13:11 somethingtodo</code></li><li>正常生成 <code>- 13:11 something</code></li><li>内容能在 Obsidian 插件 Memos 中正常显示</li><li>提供三天查询 一天修改的数据</li><li>支持消息类型: 文字，图片，链接(收藏中的)，地图位置，语音消息(直接调用微信转文字存储)</li></ul><h4 id="企业微信自建应用说明" tabindex="-1"><a class="header-anchor" href="#企业微信自建应用说明" aria-hidden="true">#</a> 企业微信自建应用说明</h4><p>企业应用自建应用，API 接收消息 URL 路径为<code>/api/workwechat</code> 。然后 obcsapiv4 配置文件中填写相关参数即可，支持文字，图片，链接，不支持语音消息。支持提醒功能。</p><h3 id="微信-前端指令模式-指令模式" tabindex="-1"><a class="header-anchor" href="#微信-前端指令模式-指令模式" aria-hidden="true">#</a> 微信/前端指令模式（指令模式）</h3><p>微信输入支持微信文字或语音。</p><p><code>对话模式 指令模式 命令模式 对话模式。 指令模式。 Talk</code>输入其中一个进入指令模式。</p><p><code>输入模式 退出 exit Exit q</code> 输入其中一个退出指令模式，进入输入模式。</p><p>指令模式/对话模式需要事先准备好 <code>dialogues.txt</code>，放到运行目录下（即和 config.yaml 一个目录） 。自定义对话回复，下面是个例子。展示了随机回复，执行脚本的能力。并且指令模式/对话模式会生成日志，可使用脚本获取最后的输入。如微信输入 <code>自定义脚本xxx</code> , 程序会调用脚本，查询对话日志，找出最后一行输入，返回<code>I: 自定义脚本xxx</code>。</p><p><strong>不建议做的事情：</strong></p><ul><li>不推荐批量传图片，推荐显示已保存后依次上传。</li><li>不推荐一秒内上传多个文件，图片命名精确到1S。1S内多图片会覆盖。</li><li>不要使用微信自带的表情符号，请使用输入法表情。</li><li>如果微信输入框换行或分段，只会在这一条消息最开始有 <code>- 13:11 </code>。也就是说，第二行、第二段不会在 Memos 插件中显示。</li></ul><div class="language-plain line-numbers-mode" data-ext="plain"><pre class="language-plain"><code>I: 你好
O: 你好呀！
O: 你好呀！有什么我可以帮助你的吗？
O: 你好呀！今天过的怎么样？

I: 今天天气
O: 无法获取天气信息。
I: 今天天气怎么样？
O: 抱歉，我暂时无法获取天气信息。这一条会被上面一条无效化。
I: 时间是多少？
O: 抱歉，我无法获取实时时钟信息。

I: 执行命令
O: 务必注意命令执行的安全性和风险，仅允许可信任和安全的命令执行。
I: 无输出命令
O: Command set a 1
I: 命令
O: Command echo &quot;Hello,World!&quot;
I: 天气
O: Command curl wttr.in?format=3
I: 自定义脚本
O: Command bash sh/example.sh
I: 其他注意
O: 执行命令可能会执行很长时间，造成网络响应超时。

I: 说明
O: I代表输入，O代表输出。监测包含字符串，给予对应回复。从上往下查找，如果设置为空，则必定能匹配上。程序暂时不提供对话上下文能力。

I: 
O: 必定可以匹配的到的。可以用于兜底，亦可以接入一个其他对话服务
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>最后一条，可以接入百度unit，获取更加智能的回复。示例脚本在 <a href="https://gitee.com/kkbt/obcsapi-go/tree/master/server/sh" target="_blank" rel="noopener noreferrer">https://gitee.com/kkbt/obcsapi-go/tree/master/server/sh<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 有提供，分别演示了获取最后一次输出，本地获取 token 内容，演示调用其他脚本等。使用 Bash 脚本，可以自定义各种各样的能力。如有 Bash 脚本编程问题，建议使用 ChatGPT 或者 New Bing 生成脚本，然后修改使用。</p><p>Docker 镜像已安装 bash , jq , curl</p><h3 id="任务提醒" tabindex="-1"><a class="header-anchor" href="#任务提醒" aria-hidden="true">#</a> 任务提醒</h3><h4 id="微信-邮件分钟级别提醒" tabindex="-1"><a class="header-anchor" href="#微信-邮件分钟级别提醒" aria-hidden="true">#</a> 微信/邮件分钟级别提醒</h4><p><a href="https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&amp;t=sandbox/index" target="_blank" rel="noopener noreferrer">登录微信测试号<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a>,模板消息接口新增测试模板，标题随意。内容处包含 <code>{{content.DATA}}</code> 即可。如</p><div class="language-plain line-numbers-mode" data-ext="plain"><pre class="language-plain"><code>待办任务： {{content.DATA}}
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>创建完成后，模板ID 复制到配置文件，作为 <code>wechat_template_id</code> 的值。</p><p>库的根目录下创建 <code>提醒任务</code> .( Obsidian 会创建 <a href="http://xn--boqu2g98t0f7b.md" target="_blank" rel="noopener noreferrer">提醒任务.md<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 文件，所以不必加后缀 .md)。内容示例如下</p><div class="language-markdown line-numbers-mode" data-ext="md"><pre class="language-markdown"><code>这是一个任务提醒功能
20230407 1322 测试提醒1
20230407 1353 测试提醒2<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>br</span><span class="token punctuation">&gt;</span></span>第二行
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>示例中,<code>20230407 1322 测试提醒1</code> 会在 2023年04月07日 13:22 发送微信模板消息。发送后的那一行消息，按配置会被移动到 <code>支持类文件/WeChatSended/202304.md</code> 中。</p><p>该功能每分钟查询一次，所以此 <code>提醒任务.md</code> 文件不要过大。否则会引起流量过大等问题。<strong>程序不会自动删除过期任务，或者是不符合任务提醒格式的行，需要手动确认删除无用内容</strong></p><p>快捷创建方式: 微信语音或文章发送包含 <code>提醒我</code> 的句子，即可添加到 <code>提醒任务.md</code>。如发送 <code>提醒我后天早上10:35的会议，需要及时参与</code> ，<code>提醒任务.md</code> 会新增 <code>20230407 1322 测试提醒1</code> 。同时后天的日记中会出现 <code>- [ ] 提醒我后天早上10:35的会议，需要及时参与</code>。</p><p>如果文字带 <code>发邮件提醒我</code> ，则到时间会发邮件提醒</p><figure><img src="/obcsapi-go/assets/20230407175219-7pQniXUl.jpg" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><figure><img src="/obcsapi-go/assets/20230407175618-af6uVleg.jpg" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>使用库: <a href="https://github.com/DanPlayer/timefinder" target="_blank" rel="noopener noreferrer">https://github.com/DanPlayer/timefinder<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><details><summary>更多示例</summary><p>6月9日有一场show要去观看<br> 2021-06-09 00:00:00<br> 后天早上10:35的会议，需要及时参与<br> 2021-06-04 10:35:00<br> 明天下午三点的飞机，提醒我坐车<br> 2021-06-03 15:00:00<br> 一个小时后提醒我喝水<br> 2021-06-02 18:40:07<br> 明天早上8:00喊我起床<br> 2021-06-03 08:00:00<br> 明天早上8点喊我起床<br> 2021-06-03 08:00:00<br> 明早十点喊我喝水<br> 2021-06-03 10:00:00<br> 明天早上十点喊我喝水<br> 2021-06-03 10:00:00<br> 明天下午三点提醒我喝水<br> 2021-06-03 15:00:00<br> 一天后提醒我喝水<br> 2021-06-03 17:40:07<br> 一年后提醒我喝水<br> 2022-06-02 17:40:07<br> 一个月后提醒我喝水<br> 2021-07-02 17:40:07<br> 一月后提醒我喝水<br> 2021-07-02 17:40:07<br> 我要住到大后天<br> 2021-06-05 00:00:00<br> 我要住到明天<br> 2021-06-03 00:00:00<br> 下个月到上个月再到这个月<br> 2021-07-02 00:00:00<br> 我要住到明天下午三点十分<br> 2021-06-03 15:10:00<br> 帮我预定明天凌晨3点的飞机<br> 2021-06-03 03:00:00<br> 今天13:00的飞机<br> 2021-06-02 13:00:00<br> 3月15号的飞机<br> 2021-03-15 00:00:00<br> 昨天凌晨2点<br> 2021-06-01 02:00:00<br> 十分钟后提醒我喝水<br> 2021-06-02 17:50:07<br></p></details><h4 id="邮件提醒" tabindex="-1"><a class="header-anchor" href="#邮件提醒" aria-hidden="true">#</a> 邮件提醒</h4><p>邮件配置正确情况下，并且配置文件中 <code>email_reminder_time</code> 处于可取的值。 Obcsapi 会读取根目录 <code>每日提醒.md</code> 和三天日记（今天，昨天，前天）中的 <code>- [ ]</code> 开头的行发送到指定邮箱中。</p><p>如果想关闭此项功能可将 <code>email_reminder_time</code> 设置为 <code>9999</code> 等数字。</p><p>邮件支持部分 HTML 标签，因此在 <code>每日提醒.md</code> 写可以实现每日随机一句话的效果。</p><p>如 <a href="https://gushi.ci/" target="_blank" rel="noopener noreferrer">https://gushi.ci/<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a> 的返回随机古诗的图片</p><p>举例来说</p><div class="language-markdown line-numbers-mode" data-ext="md"><pre class="language-markdown"><code><span class="token list punctuation">-</span> [ ] <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>img</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>https://v1.jinrishici.com/all.svg<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
<span class="token list punctuation">-</span> [ ] <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>img</span> <span class="token attr-name">src</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>https://cdn.seovx.com/d/?mom=302<span class="token punctuation">&quot;</span></span> <span class="token attr-name">style</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">&quot;</span>max-width: 100%; max-height: 100%;<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
<span class="token list punctuation">-</span> [ ] 
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>效果大概这样：</p><figure><img src="/obcsapi-go/assets/20230407181447-kLacQ8sK.jpg" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><p>在 微信-设置-通用-辅助功能-QQ邮箱提醒 中启用邮箱提醒功能，每天设置的时间就会在微信中接收到一封这样的邮件。</p><h3 id="fv-悬浮球" tabindex="-1"><a class="header-anchor" href="#fv-悬浮球" aria-hidden="true">#</a> fv 悬浮球</h3><p>设置自定义任务，设置分享菜单为文字，图片 POST /ob/fv ，Header Token 为 token2 的值。</p><p><a href="https://www.ftls.xyz/posts/obcsapi-fc-simple/#%E4%B8%8B%E8%BD%BD%E5%8E%8B%E7%BC%A9%E5%8C%85" target="_blank" rel="noopener noreferrer">图文教程 中的 fv 部分<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><p>演示和教程 见 <a href="https://www.bilibili.com/video/BV1Ad4y1s7EP/" target="_blank" rel="noopener noreferrer">https://www.bilibili.com/video/BV1Ad4y1s7EP/<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span></a></p><h3 id="简悦-webhook-配置" tabindex="-1"><a class="header-anchor" href="#简悦-webhook-配置" aria-hidden="true">#</a> 简悦 Webhook 配置</h3><p>简悦-服务 Webhook 填写样例</p><div class="language-json line-numbers-mode" data-ext="json"><pre class="language-json"><code><span class="token punctuation">{</span><span class="token property">&quot;name&quot;</span><span class="token operator">:</span> <span class="token string">&quot;WH2COS&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;http://localhost:8900/ob/sr/webhook&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;POST&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;headers&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token property">&quot;Content-Type&quot;</span><span class="token operator">:</span> <span class="token string">&quot;application/json&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;Token&quot;</span><span class="token operator">:</span> <span class="token string">&quot;your_simp_read_token&quot;</span><span class="token punctuation">}</span><span class="token punctuation">,</span><span class="token property">&quot;body&quot;</span><span class="token operator">:</span> <span class="token punctuation">{</span><span class="token property">&quot;url&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{{url}}&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;title&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{{title}}&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;desc&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{{desc}}&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;content&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{{content}}&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;tags&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{{tags}}&quot;</span><span class="token punctuation">,</span><span class="token property">&quot;note&quot;</span><span class="token operator">:</span> <span class="token string">&quot;{{note}}&quot;</span><span class="token punctuation">}</span><span class="token punctuation">}</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><h3 id="每日日志分析示例" tabindex="-1"><a class="header-anchor" href="#每日日志分析示例" aria-hidden="true">#</a> 每日日志分析示例</h3><p>ChatGPT 分析笔记，云函数 python 3 环境部署，设置定时运作即可。使用接口需要 obcsapi 版本 &gt;= 4.2.6<br> 注意 虽然 python 可以使用中文作为函数名和变量名，但是括号等符号需要英文的。</p><div class="language-python line-numbers-mode" data-ext="py"><pre class="language-python"><code><span class="token comment"># -*- coding: utf-8 -*-</span>
<span class="token keyword">import</span> logging
<span class="token keyword">import</span> json
<span class="token keyword">import</span> requests


<span class="token comment"># 变量</span>
后端今日日志接口URL <span class="token operator">=</span> <span class="token string">&quot;http://localhost:8900/ob/today&quot;</span>
后端接口Token <span class="token operator">=</span><span class="token string">&quot;xxx自己的token2&quot;</span>
ChatgptToken <span class="token operator">=</span> <span class="token string">&quot;sk-xxxxxxxxxxxxx&quot;</span>


logger <span class="token operator">=</span> logging<span class="token punctuation">.</span>getLogger<span class="token punctuation">(</span><span class="token punctuation">)</span>

<span class="token keyword">def</span> AI分析笔记<span class="token punctuation">(</span>文本内容<span class="token punctuation">)</span><span class="token punctuation">:</span>
    OpenAI的URL <span class="token operator">=</span> <span class="token string">&quot;https://api.openai.com/v1/chat/completions&quot;</span>
    请求头 <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;Authorization&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;Bearer &quot;</span><span class="token operator">+</span>ChatgptToken<span class="token punctuation">,</span>
        <span class="token string">&quot;Content-Type&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;application/json&quot;</span>
    <span class="token punctuation">}</span>

    响应 <span class="token operator">=</span> requests<span class="token punctuation">.</span>post<span class="token punctuation">(</span>url<span class="token operator">=</span>OpenAI的URL<span class="token punctuation">,</span> headers<span class="token operator">=</span>请求头<span class="token punctuation">,</span> json<span class="token operator">=</span><span class="token punctuation">{</span>
        <span class="token string">&quot;model&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;gpt-3.5-turbo&quot;</span><span class="token punctuation">,</span>
        <span class="token string">&quot;messages&quot;</span><span class="token punctuation">:</span> <span class="token punctuation">[</span><span class="token punctuation">{</span><span class="token string">&quot;role&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;system&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;content&quot;</span><span class="token punctuation">:</span> <span class="token string">&quot;You: &quot;</span> <span class="token operator">+</span> 文本内容<span class="token punctuation">}</span><span class="token punctuation">]</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span>

    响应的JSON <span class="token operator">=</span> 响应<span class="token punctuation">.</span>json<span class="token punctuation">(</span><span class="token punctuation">)</span>
    logger<span class="token punctuation">.</span>info<span class="token punctuation">(</span>响应的JSON<span class="token punctuation">)</span>
    choices <span class="token operator">=</span> 响应的JSON<span class="token punctuation">[</span><span class="token string">&#39;choices&#39;</span><span class="token punctuation">]</span>
    <span class="token comment"># logger.info(choices)</span>
    结果 <span class="token operator">=</span> <span class="token string">&quot;&quot;</span>

    <span class="token keyword">for</span> choice <span class="token keyword">in</span> choices<span class="token punctuation">:</span>
        text <span class="token operator">=</span> choice<span class="token punctuation">[</span><span class="token string">&#39;message&#39;</span><span class="token punctuation">]</span><span class="token punctuation">[</span><span class="token string">&#39;content&#39;</span><span class="token punctuation">]</span>
        结果 <span class="token operator">+=</span> text

    <span class="token keyword">return</span> 结果<span class="token punctuation">.</span>strip<span class="token punctuation">(</span><span class="token punctuation">)</span>


<span class="token keyword">def</span> 获取今日日志<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
    请求头 <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;Token&quot;</span><span class="token punctuation">:</span> 后端接口Token<span class="token punctuation">,</span>
    <span class="token punctuation">}</span>
    响应 <span class="token operator">=</span> requests<span class="token punctuation">.</span>get<span class="token punctuation">(</span>url<span class="token operator">=</span>后端今日日志接口URL<span class="token punctuation">,</span>headers<span class="token operator">=</span>请求头<span class="token punctuation">)</span>
    <span class="token keyword">return</span> 响应<span class="token punctuation">.</span>text

<span class="token keyword">def</span> 新增今日日志<span class="token punctuation">(</span>新增的内容<span class="token punctuation">)</span><span class="token punctuation">:</span>
    请求头 <span class="token operator">=</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;Token&quot;</span><span class="token punctuation">:</span> 后端接口Token
    <span class="token punctuation">}</span>
    响应 <span class="token operator">=</span> requests<span class="token punctuation">.</span>post<span class="token punctuation">(</span>url<span class="token operator">=</span>后端今日日志接口URL<span class="token punctuation">,</span>headers<span class="token operator">=</span>请求头<span class="token punctuation">,</span>data<span class="token operator">=</span>新增的内容<span class="token punctuation">.</span>encode<span class="token punctuation">(</span><span class="token string">&quot;utf-8&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span>

<span class="token keyword">def</span> 今日日志处理分析<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
    日志文本 <span class="token operator">=</span> 获取今日日志<span class="token punctuation">(</span><span class="token punctuation">)</span>
    AI提示词 <span class="token operator">=</span> <span class="token string">&quot;分析下面的笔记，提炼要点并给出意见。下面为笔记内容: &quot;</span>
    AI返回文本 <span class="token operator">=</span> AI分析笔记<span class="token punctuation">(</span>AI提示词<span class="token operator">+</span>日志文本<span class="token punctuation">)</span>
    新增日志内容 <span class="token operator">=</span> <span class="token string">&quot;\n- ChatGPT 分析: \n&quot;</span> <span class="token operator">+</span> AI返回文本
    新增今日日志<span class="token punctuation">(</span>新增日志内容<span class="token punctuation">)</span>
    <span class="token keyword">return</span> 新增日志内容

今日日志处理分析<span class="token punctuation">(</span><span class="token punctuation">)</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></div><!--[--><!----><!--]--><footer class="page-meta"><div class="meta-item edit-link"><a href="https://gitee.com/kkbt/obcsapi-go/edit/main/src/md/go-version/4-功能使用.md" rel="noopener noreferrer" target="_blank" aria-label="编辑此页" class="nav-link label"><!--[--><svg xmlns="http://www.w3.org/2000/svg" class="icon edit-icon" viewBox="0 0 1024 1024" fill="currentColor" aria-label="edit icon"><path d="M430.818 653.65a60.46 60.46 0 0 1-50.96-93.281l71.69-114.012 7.773-10.365L816.038 80.138A60.46 60.46 0 0 1 859.225 62a60.46 60.46 0 0 1 43.186 18.138l43.186 43.186a60.46 60.46 0 0 1 0 86.373L588.879 565.55l-8.637 8.637-117.466 68.234a60.46 60.46 0 0 1-31.958 11.229z"></path><path d="M728.802 962H252.891A190.883 190.883 0 0 1 62.008 771.98V296.934a190.883 190.883 0 0 1 190.883-192.61h267.754a60.46 60.46 0 0 1 0 120.92H252.891a69.962 69.962 0 0 0-69.098 69.099V771.98a69.962 69.962 0 0 0 69.098 69.098h475.911A69.962 69.962 0 0 0 797.9 771.98V503.363a60.46 60.46 0 1 1 120.922 0V771.98A190.883 190.883 0 0 1 728.802 962z"></path></svg><!--]-->编辑此页<span><svg class="external-link-icon" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" focusable="false" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path><polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg><span class="external-link-icon-sr-only">open in new window</span></span><!----></a></div><div class="meta-item git-info"><div class="update-time"><span class="label">上次编辑于: </span><!----></div><div class="contributors"><span class="label">贡献者: </span><!--[--><!--[--><span class="contributor" title="email: 0@ftls.xyz">kkbt</span><!--]--><!--]--></div></div></footer><nav class="vp-page-nav"><a aria-label="3. 配置说明" class="vp-link nav-link prev nav-link prev" href="/obcsapi-go/md/go-version/3-%E9%85%8D%E7%BD%AE%E8%AF%B4%E6%98%8E.html"><div class="hint"><span class="arrow start"></span>上一页</div><div class="link"><!---->3. 配置说明</div></a><a aria-label="5. 图床说明" class="vp-link nav-link next nav-link next" href="/obcsapi-go/md/go-version/5-%E5%9B%BE%E5%BA%8A%E8%AF%B4%E6%98%8E.html"><div class="hint">下一页<span class="arrow end"></span></div><div class="link">5. 图床说明<!----></div></a></nav><div id="comment" class="giscus-wrapper input-top" style="display:block;"><div class="loading-icon-wrapper" style="display:flex;align-items:center;justify-content:center;height:96px"><svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" preserveAspectRatio="xMidYMid" viewBox="25 25 50 50"><animateTransform attributeName="transform" type="rotate" dur="2s" keyTimes="0;1" repeatCount="indefinite" values="0;360"></animateTransform><circle cx="50" cy="50" r="20" fill="none" stroke="currentColor" stroke-width="4" stroke-linecap="round"><animate attributeName="stroke-dasharray" dur="1.5s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1,200;90,200;1,200"></animate><animate attributeName="stroke-dashoffset" dur="1.5s" keyTimes="0;0.5;1" repeatCount="indefinite" values="0;-35px;-125px"></animate></circle></svg></div></div><!--[--><!----><!--]--><!--]--></main><!--]--><footer class="vp-footer-wrapper"><div class="vp-footer"><a href="https://www.ftls.xyz/" target="_blank" rel="noopener noreferrer">恐咖兵糖</a></div><div class="vp-copyright">Copyright © 2023 恐咖兵糖</div></footer></div><!--]--><!--]--><!----><!--]--></div>
    <script type="module" src="/obcsapi-go/assets/app-Z7Ab_rlY.js" defer></script>
  </body>
</html>
